#include "fwincludes.h"

key_t key1;

void down(key_t *k)
{
	printf("key down: %bd\n", k->id);
}

void up(key_t *k)
{
	printf("key up: %bd\n", k->id);
}

void main()
{
	FwApplicationInit(11059200);
	FwApplicationStart();

	SOC_TimerInit(2, 1000);
	SOC_TimerStart(2);
	
	KeyInit(&key1, 1, S_P1, 1);
	KeySetDownCallBack(&key1, down);
	KeySetUpCallBack(&key1, up);

	while(1)
	{
		FwApplicationExec();
		
		LogDebug("hello world %bd %s\r\n", 100, "ooo");
		
		// TIME_EXEC_CALL(1000, SOC_GpioTrigger(S_P1, 0));
 	}
}